package KiemTra;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

public class BVMHLeft extends Thread{
JPanel ve = new JPanel();
	
	public BVMHLeft(JPanel c){
		ve = c;
	}
	
	public void run(){
		int cg = 200;
		while(true){
			Graphics g = ve.getGraphics();
			g.setColor(new Color((int)(255*Math.random()), (int)(255*Math.random()), (int)(255*Math.random())));
			
			for(int i = 0; i <= 200; i++){
				g.drawLine(cg - i , cg - i, cg - i, cg + i);
				
				try{
					Thread.sleep(10);
				}
				catch(InterruptedException e){}
			}
			g.setColor(new Color((int)(255*Math.random()), (int)(255*Math.random()), (int)(255*Math.random())));
			for(int i = 200; i >= 0; i--){
				g.drawLine(cg - i , cg - i, cg - i, cg + i);
				
				try{
					Thread.sleep(10);
				}
				catch(InterruptedException e){}
			}			
		}
	}
}
